#! /bin/bash

echo -e "size\ttime\ttime fast"



for size in $(seq 10 5 500)
do
   time=0
   timefast=0
   aprox=0
   aproxfast=0
   opt=0
   
   for i in $(seq 1 10)
   do
    for delta in $(seq 0 19)
    do
        genAleaMatrix/exe -g 3 $size $delta > /tmp/$$matrix
        aproxfast=$(/usr/bin/time -f "%U" -o /tmp/$$timefast ./exe -f -i /tmp/$$matrix -s | evalDelta/exe)
        #aprox=$(/usr/bin/time -f "%U" -o /tmp/$$time ./exe -i /tmp/$$matrix -s | evalDelta/exe)
        opt=$(evalDelta/exe -i /tmp/$$matrix)
        
        #time=$(echo "$time+$(tail -1 /tmp/$$time)" | bc -l)
        timefast=$(echo "$timefast+$(tail -1 /tmp/$$timefast)" | bc -l)
    done
   done
    echo -e "$size\t$time\t$timefast"
done
